package com.hsck.order.kds.setup

import android.view.LayoutInflater
import com.hsck.order.kds.base.isnoam.view.BaseActivity
import com.hsck.order.kds.databinding.ActivityKitchenDisplaySettingsBinding
import kotlinx.android.synthetic.main.common_head.*

class KitchenDisplaySettingsActivity : BaseActivity<ActivityKitchenDisplaySettingsBinding>() {


    override fun inflateBinding(inflater: LayoutInflater): ActivityKitchenDisplaySettingsBinding {
        return ActivityKitchenDisplaySettingsBinding.inflate(inflater)
    }

    override fun initData() {
        super.initData()
        binding.apply {
            lin_head_back.setOnClickListener { finish() }
            //单品划菜
            linKitchenDisplaySettingsDanpin.setOnClickListener {
                cbKitchenDisplaySettingsDanpin.isChecked = true
                cbKitchenDisplaySettingsPiliang.isChecked = false
            }
            //批量划菜
            linKitchenDisplaySettingsPiliang.setOnClickListener {
                cbKitchenDisplaySettingsDanpin.isChecked = false
                cbKitchenDisplaySettingsPiliang.isChecked = true
            }
            //部分划菜
            linKitchenDisplaySettingsBufen.setOnClickListener {
                cbKitchenDisplaySettingsBufen.isChecked = true
                cbKitchenDisplaySettingsKuaidu.isChecked = false
            }
            //快速划菜
            linKitchenDisplaySettingsKuaisu.setOnClickListener {
                cbKitchenDisplaySettingsBufen.isChecked = false
                cbKitchenDisplaySettingsKuaidu.isChecked = true
            }
            //保存设置
            btnKitchenDisplaySettings.setOnClickListener {
                finish()
            }
        }

    }
}